<template>
  <div class="tab-box">
    <div class="navbar-title">
      {{ componentData[`title${capitalizeLang}`] }}
    </div>
    <div v-for="(item, index) in componentData.list" :key="index" class="navbar-box">
      <div class="navbar-in">
        {{ item[`title${capitalizeLang}`] }}
      </div>
      <div class="navbar-content">
        <div v-for="(d, zindex) in item.detail" :key="zindex" class="n-c-row">
          <p class="n-c-label">{{ d[`name${capitalizeLang}`] }}</p>
          <p>{{ d[`value${capitalizeLang}`] }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  props: {
    componentData: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      currentNavbar: 0,
    }
  },
  computed: {
    ...mapGetters(['capitalizeLang']),
    currentDetail() {
      return this.componentData.list[this.currentNavbar]?.detail || []
    },
  },
}
</script>

<style lang="less" scoped>
@import '~assets/var';

.tab-box {
  background-color: #121214;
  width: 100%;
  padding: 60px 0 80px 0;
  color: #fff;

  .navbar-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
  }

  .navbar-box {
    margin-top: 60px;
    padding: 0 48px;

    .navbar-in {
      font-size: 30px;
      font-weight: 500;
      line-height: 40px;
    }

    .navbar-content {
      .n-c-row {
        display: flex;
        background-color: #4c5055;
        font-size: 20px;
        height: 52px;
        line-height: 52px;
        margin-top: 20px;
      }

      p {
        padding-left: 20px;
      }

      .n-c-label {
        width: 210px;
        border-right: 1px solid #121214;
      }
    }
  }
}
</style>
